package com.taobao.api.request;

import java.util.List;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.internal.mapping.ApiListField;
import com.taobao.api.TaobaoObject;
import java.util.Map;

import com.taobao.api.ApiRuleException;
import com.taobao.api.BaseTaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.internal.util.json.JSONWriter;
import com.taobao.api.response.TmallNrInventoryUpdateResponse;

/**
 * TOP API: tmall.nr.inventory.update request
 * 
 * @author top auto create
 * @since 1.0, 2018.07.25
 */
public class TmallNrInventoryUpdateRequest extends BaseTaobaoRequest<TmallNrInventoryUpdateResponse> {
	
	

	/** 
	* 入参
	 */
	private String param0;

	public void setParam0(String param0) {
		this.param0 = param0;
	}

	public void setParam0(NrInventoryUpdateReqDto param0) {
		this.param0 = new JSONWriter(false,true).write(param0);
	}

	public String getParam0() {
		return this.param0;
	}

	public String getApiMethodName() {
		return "tmall.nr.inventory.update";
	}

	public Map<String, String> getTextParams() {		
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("param0", this.param0);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public Class<TmallNrInventoryUpdateResponse> getResponseClass() {
		return TmallNrInventoryUpdateResponse.class;
	}

	public void check() throws ApiRuleException {
	}
	
	/**
 * 更新库存的列表值
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class NrInventoryCheckDetailDto extends TaobaoObject {

	private static final long serialVersionUID = 1243498775559187932L;

	/**
		 * 数量
		 */
		@ApiField("quantity")
		private Long quantity;
		/**
		 * 商家的商品编码
		 */
		@ApiField("sc_item_code")
		private String scItemCode;
		/**
		 * 淘宝后端商品的id号
		 */
		@ApiField("sc_item_id")
		private Long scItemId;
		/**
		 * 幂等值
		 */
		@ApiField("sub_order_id")
		private String subOrderId;
	

	public Long getQuantity() {
			return this.quantity;
		}
		public void setQuantity(Long quantity) {
			this.quantity = quantity;
		}
		public String getScItemCode() {
			return this.scItemCode;
		}
		public void setScItemCode(String scItemCode) {
			this.scItemCode = scItemCode;
		}
		public Long getScItemId() {
			return this.scItemId;
		}
		public void setScItemId(Long scItemId) {
			this.scItemId = scItemId;
		}
		public String getSubOrderId() {
			return this.subOrderId;
		}
		public void setSubOrderId(String subOrderId) {
			this.subOrderId = subOrderId;
		}

}

	/**
 * 入参
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class NrInventoryUpdateReqDto extends TaobaoObject {

	private static final long serialVersionUID = 7723918944193264661L;

	/**
		 * 定时送dss，jsd极速达
		 */
		@ApiField("biz_identity")
		private String bizIdentity;
		/**
		 * 1表示全量，2表示增量
		 */
		@ApiField("check_mode")
		private Long checkMode;
		/**
		 * 更新库存的列表值
		 */
		@ApiListField("detail_list")
		@ApiField("nr_inventory_check_detail_dto")
		private List<NrInventoryCheckDetailDto> detailList;
		/**
		 * 幂等值
		 */
		@ApiField("order_id")
		private String orderId;
		/**
		 * 商家的sellerID，如果是零售商需要给品牌的sellerId
		 */
		@ApiField("owner_id")
		private Long ownerId;
		/**
		 * 门店编号
		 */
		@ApiField("store_code")
		private String storeCode;
	

	public String getBizIdentity() {
			return this.bizIdentity;
		}
		public void setBizIdentity(String bizIdentity) {
			this.bizIdentity = bizIdentity;
		}
		public Long getCheckMode() {
			return this.checkMode;
		}
		public void setCheckMode(Long checkMode) {
			this.checkMode = checkMode;
		}
		public List<NrInventoryCheckDetailDto> getDetailList() {
			return this.detailList;
		}
		public void setDetailList(List<NrInventoryCheckDetailDto> detailList) {
			this.detailList = detailList;
		}
		public String getOrderId() {
			return this.orderId;
		}
		public void setOrderId(String orderId) {
			this.orderId = orderId;
		}
		public Long getOwnerId() {
			return this.ownerId;
		}
		public void setOwnerId(Long ownerId) {
			this.ownerId = ownerId;
		}
		public String getStoreCode() {
			return this.storeCode;
		}
		public void setStoreCode(String storeCode) {
			this.storeCode = storeCode;
		}

}


}